home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / sys-include / clib / Warp3D_protos.h < prev    next >
C/C++ Source or Header  |  2000-03-13  |  7KB  |  159 lines

  1. /*
  2. **
  3. ** Prototypes for Warp3D main library
  4. ** $VER: Warp3D_protos.h 1.0 (26.07.98)
  5. **
  6. **
  7. ** This file is part of the Warp3D Project.
  8. ** Warp3D is copyrighted
  9. ** (C) 1998 Sam Jordan, Hans-Jörg Frieden, Thomas Frieden
  10. ** All rights reserved
  11. **
  12. ** See the documentation for conditions.
  13. **
  14. */
  15.  
  16. #ifndef __CLIB_WARP3D_PROTOS_H
  17. #define __CLIB_WARP3D_PROTOS_H
  18.  
  19. #ifndef EXEC_TYPES_H
  20. #include <exex/types.h>
  21. #endif
  22. #ifndef __WARP3D_WARP3D_H
  23. #include <Warp3D/Warp3D.h>
  24. #endif
  25. #ifndef GRAPHICS_GFX_H
  26. #include <graphics/gfx.h>
  27. #endif
  28.  
  29. #if defined(__STORM__) && defined(__PPC__)
  30.  
  31. #ifndef STORMPROTOS_WARP3D_SPROTOS_H
  32. #include <stormprotos/warp3d_sprotos.h>
  33. #endif
  34.  
  35. #else
  36.  
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42.  
  43. /************************** Context functions ***********************************/
  44. W3D_Context    *W3D_CreateContext(ULONG *error, struct TagItem *CCTags);
  45. W3D_Context    *W3D_CreateContextTags(ULONG *error, Tag tag1, ...);
  46. void            W3D_DestroyContext(W3D_Context *context);
  47. ULONG           W3D_GetState(W3D_Context *context, ULONG state);
  48. ULONG           W3D_SetState(W3D_Context *context, ULONG state, ULONG action);
  49. ULONG           W3D_Hint(W3D_Context *context, ULONG mode, ULONG quality);
  50.  
  51. /************************** Hardware/Driver functions ***************************/
  52. ULONG           W3D_CheckDriver(void);
  53. ULONG           W3D_LockHardware(W3D_Context *context);
  54. void            W3D_UnLockHardware(W3D_Context *context);
  55. void            W3D_WaitIdle(W3D_Context *context);
  56. ULONG           W3D_CheckIdle(W3D_Context *context);
  57. ULONG           W3D_Query(W3D_Context *context, ULONG query, ULONG destfmt);
  58. ULONG           W3D_GetTexFmtInfo(W3D_Context *context, ULONG texfmt, ULONG destfmt);
  59. ULONG           W3D_GetDriverState(W3D_Context *context);
  60. ULONG           W3D_GetDestFmt(void);
  61.  
  62. /************************** Texture functions ***********************************/
  63. W3D_Texture    *W3D_AllocTexObj(W3D_Context *context, ULONG *error,
  64.                                         struct TagItem *ATOTags);
  65. W3D_Texture    *W3D_AllocTexObjTags(W3D_Context *context, ULONG *error,
  66.                                         Tag tag1, ...);
  67. void            W3D_FreeTexObj(W3D_Context *context, W3D_Texture *texture);
  68. void            W3D_ReleaseTexture(W3D_Context *context, W3D_Texture *texture);
  69. void            W3D_FlushTextures(W3D_Context *context);
  70. ULONG           W3D_SetFilter(W3D_Context *context, W3D_Texture *texture,
  71.                                         ULONG MinFilter, ULONG MagFilter);
  72. ULONG           W3D_SetTexEnv(W3D_Context *context, W3D_Texture *texture,
  73.                                         ULONG envparam, W3D_Color *envcolor);
  74. ULONG           W3D_SetWrapMode(W3D_Context *context, W3D_Texture *texture,
  75.                                         ULONG mode_s, ULONG mode_t, W3D_Color *bordercolor);
  76. ULONG           W3D_UpdateTexImage(W3D_Context *context, W3D_Texture *texture,
  77.                                         void *teximage, int level, ULONG *palette);
  78. ULONG           W3D_UpdateTexSubImage(W3D_Context *context, W3D_Texture *texture, void *teximage,
  79.                     ULONG level, ULONG *palette, W3D_Scissor* scissor, ULONG srcbpr);
  80. ULONG           W3D_UploadTexture(W3D_Context *context, W3D_Texture *texture);
  81. ULONG           W3D_FreeAllTexObj(W3D_Context *context);
  82.  
  83. /************************** Drawing functions ***********************************/
  84. ULONG           W3D_DrawLine(W3D_Context *context, W3D_Line *line);
  85. ULONG           W3D_DrawPoint(W3D_Context *context, W3D_Point *point);
  86. ULONG           W3D_DrawTriangle(W3D_Context *context, W3D_Triangle *triangle);
  87. ULONG           W3D_DrawTriFan(W3D_Context *context, W3D_Triangles *triangles);
  88. ULONG           W3D_DrawTriStrip(W3D_Context *context, W3D_Triangles *triangles);
  89. ULONG           W3D_Flush(W3D_Context *context);
  90.  
  91. /************************** Effect functions ************************************/
  92. ULONG           W3D_SetAlphaMode(W3D_Context *context, ULONG mode, W3D_Float *refval);
  93. ULONG           W3D_SetBlendMode(W3D_Context *context, ULONG srcfunc, ULONG dstfunc);
  94. ULONG           W3D_SetDrawRegion(W3D_Context *context, struct BitMap *bm,
  95.                                         int yoffset, W3D_Scissor *scissor);
  96. ULONG           W3D_SetDrawRegionWBM(W3D_Context *context, W3D_Bitmap *bm,
  97.                                         W3D_Scissor *scissor);
  98. ULONG           W3D_SetFogParams(W3D_Context *context, W3D_Fog *fogparams,
  99.                                         ULONG fogmode);
  100. ULONG           W3D_SetLogicOp(W3D_Context *context, ULONG operation);
  101. ULONG           W3D_SetColorMask(W3D_Context *context, W3D_Bool red, W3D_Bool green,
  102.                                         W3D_Bool blue, W3D_Bool alpha);
  103. ULONG           W3D_SetPenMask(W3D_Context *context, ULONG pen);
  104. ULONG           W3D_SetCurrentColor(W3D_Context *context, W3D_Color *color);
  105. ULONG           W3D_SetCurrentPen(W3D_Context *context, ULONG pen);
  106.  
  107. /************************** ZBuffer functions ***********************************/
  108. ULONG           W3D_AllocZBuffer(W3D_Context *context);
  109. ULONG           W3D_FreeZBuffer(W3D_Context *context);
  110. ULONG           W3D_ClearZBuffer(W3D_Context *context, W3D_Double *clearvalue);
  111. ULONG           W3D_ReadZPixel(W3D_Context *context, ULONG x, ULONG y,
  112.                                         W3D_Double *z);
  113. ULONG           W3D_ReadZSpan(W3D_Context *context, ULONG x, ULONG y,
  114.                                         ULONG n, W3D_Double z[]);
  115. ULONG           W3D_SetZCompareMode(W3D_Context *context, ULONG mode);
  116. void            W3D_WriteZPixel(W3D_Context *context, ULONG x, ULONG y,
  117.                                         W3D_Double *z);
  118. void            W3D_WriteZSpan(W3D_Context *context, ULONG x, ULONG y,
  119.                                         ULONG n, W3D_Double z[], UBYTE mask[]);
  120.  
  121. /************************** StencilBuffer functions *****************************/
  122. ULONG           W3D_AllocStencilBuffer(W3D_Context *context);
  123. ULONG           W3D_ClearStencilBuffer(W3D_Context *context, ULONG *clearvalue);
  124. ULONG           W3D_FillStencilBuffer(W3D_Context *context, ULONG x, ULONG y,
  125.                                         ULONG width, ULONG height, ULONG depth,
  126.                                         void *data);
  127. ULONG           W3D_FreeStencilBuffer(W3D_Context *context);
  128. ULONG           W3D_ReadStencilPixel(W3D_Context *context, ULONG x, ULONG y,
  129.                                         ULONG *st);
  130. ULONG           W3D_ReadStencilSpan(W3D_Context *context, ULONG x, ULONG y,
  131.                                         ULONG n, ULONG st[]);
  132. ULONG           W3D_SetStencilFunc(W3D_Context *context, ULONG func, ULONG refvalue,
  133.                                         ULONG mask);
  134. ULONG           W3D_SetStencilOp(W3D_Context *context, ULONG sfail, ULONG dpfail,
  135.                                         ULONG dppass);
  136. ULONG           W3D_SetWriteMask(W3D_Context *context, ULONG mask);
  137. ULONG           W3D_WriteStencilPixel(W3D_Context *context, ULONG x, ULONG y, ULONG st);
  138. ULONG           W3D_WriteStencilSpan(W3D_Context *context, ULONG x, ULONG y, ULONG n,
  139.                                         ULONG st[], UBYTE mask[]);
  140.  
  141. #ifdef __cplusplus
  142. };
  143. #endif
  144.  
  145.  
  146. #ifndef __PPC__
  147. #ifdef STORMPRAGMAS
  148. #ifndef _INCLUDE_PRAGMA_WARP3D_LIB_H
  149. #include <pragma/Warp3D_lib.h>
  150. #endif
  151. #endif
  152. #endif
  153.  
  154. #endif /* __STORM__ && __PPC__ */
  155.  
  156. #endif
  157.  
  158.  
  159.